import 'package:flutter/material.dart';
import 'package:flutter_chat/common/style/styles.dart';
import 'package:flutter_chat/common/widget/widgets.dart';

class CellInfo extends StatelessWidget {
  final String title;
  final Widget? widget;
  final Function()? onTap;
  const CellInfo({
    super.key,
    this.widget,
    this.onTap,
    required this.title,
  });

  @override
  Widget build(BuildContext context) {
    return CellWidget(
      onTap: onTap,
      right: Row(
        children: [
          if (widget != null) widget!,
          const Icon(
            Icons.chevron_right,
            color: AppTheme.minorColor,
          ),
        ],
      ),
      title: title,
    );
  }
}
